<%@ taglib prefix="from" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>代理商信息</title>
    <meta name="decorator" content="default"/>

</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/sys/agent/byUIDAgent">个人信息</a></li>
    <li class="active"><a href="${ctx}/sys/agent/">我的账户</a></li>
</ul>
<br/>
<form:form id="inputForm" modelAttribute="user" action="${ctx}/sys/agent/updateAgent" class="form-horizontal">

    <div class="control-group">
        <label class="control-label">代理区域:</label>
        <div class="controls">
            <label class="lbl">${qy}&nbsp;&nbsp;&nbsp;&nbsp;</label>
        </div>
    </div>
    <from:hidden path="id" htmlEscape="false" maxlength="50" class="required"/>
    <div class="control-group">
        <label class="control-label">姓名:</label>
        <div class="controls">
            <form:input path="realName" htmlEscape="false" maxlength="50" class="required"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">姓别:</label>
        <div class="controls">
            <form:input path="sex" htmlEscape="false" maxlength="50" class="required"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">电话:</label>
        <div class="controls">
            <form:input path="mobile" htmlEscape="false" maxlength="50"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">手机:</label>
        <div class="controls">
            <form:input path="phone" htmlEscape="false" maxlength="50"/>
        </div>
    </div>
    <%--  <div class="control-group">
         <label class="control-label">证件类型:</label>
         <div class="controls">
        </div>
             <c:if test="${user.cardType eq '0'}">
                 <input value = "身份证" htmlEscape="false" maxlength="50" class="required"/>
             </c:if>

             <c:if test="${user.cardType eq '1'}">
                 <input value = "驾驶证" htmlEscape="false" maxlength="50" class="required"/>
             </c:if>

             <c:if test="${user.cardType eq '2'}">
                 &lt;%&ndash;  style="font-size: 14px;color:#555 ;padding: 4px 6px;"     Jyy   暂时不要删除这段  &ndash;%&gt;
                 <input value = "护照" htmlEscape="false" maxlength="50" class="required"/>
             </c:if>
         </div>
     </div>--%>
     <div class="control-group">
         <label class="control-label">证件类型:</label>
         <div class="controls">
             <select name="cardType" value="${user.cardType}" class="input-medium select2-offscreen">
                 <option value="0"
                         <c:if test="${'0' eq user.cardType}">selected</c:if> >身份证
                 </option>
                 <option value="1"
                         <c:if test="${'1' eq user.cardType}">selected</c:if> > 驾驶证
                 </option>
                 <option value="2"
                         <c:if test="${'2' eq user.cardType}">selected</c:if> > 护照
                 </option>
             </select>
         </div>
     </div>
    <div class="control-group">
        <label class="control-label">证件号码:</label>
        <div class="controls">
            <form:input path="cardNo" htmlEscape="false" maxlength="50" class="required"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">证件正面照:</label>
        <div class="controls">
            <form:hidden id="nameImage" path="cardFrontUrl" htmlEscape="false" maxlength="255" class="input-xlarge"/>
                <%--<img src="${user.cardFrontUrl}"  height="400px" width="300px"/>--%>
            <sys:ckfinder input="nameImage" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
                          maxHeight="100"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">证件反面照:</label>
        <div class="controls">
            <form:hidden id="nameImage1" path="cardBackUrl" htmlEscape="false" maxlength="255" class="input-xlarge"/>
                <%--<img src="${user.cardFrontUrl}"  height="400px" width="300px"/>--%>
            <sys:ckfinder input="nameImage1" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
                          maxHeight="100"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">用户角色:</label>
        <div class="controls">
            <label class="lbl">${user.name}</label>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">上次登录:</label>
        <div class="controls">
            <label class="lbl">IP: ${user.oldLoginIp}&nbsp;&nbsp;&nbsp;&nbsp;时间：<fmt:formatDate
                    value="${user.oldLoginDate}" type="both" dateStyle="full"/></label>
        </div>
    </div>
    <div class="form-actions">
        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>
    </div>
</form:form>
</body>
</html>